home *** CD-ROM | disk | FTP | other *** search
Text File | 1986-11-22 | 2.5 KB | 58 lines | [TEXT/R*ch] |
-
- "Fortune" (c) by David Fry, October 9, 1986
-
- Fortune is a spinoff of the fortune game/utility on Unix machines. It
- displays a randomly selected saying in a window. These sayings are
- stored in a resource file called "Cookies".
-
- Cookies contains 'STR#' resources numbered 1, 2, 3,... up to the maximum
- number of cookies. The Cookies file distributed with this posting has
- only 46 cookies, but you are welcome and encouraged to edit and add
- to these. You can even have several files, however the program
- will only access the one named Cookies. Just rename the others to
- reflect their content, like "Philosophic Cookies".
-
- I want to write a supplementary program called Cookie Editor for
- changing and testing the sayings but I just don't have the time now.
- I didn't want to holdup the rest of the program anymore, so for now
- you'll have to use ResEdit. Be sure to number cookies successively; if
- you want to add your own saying to this file, add a new 'STR#' resource
- and change its ID to 47 (in this case) with the "Get Info" option.
-
- When the program runs, a code of the form "N/M" appears in the
- left-hand side of the menu bar, where N and M are whole numbers. N
- is the resource ID of the saying that is displayed, and M is the
- total number of sayings in the Cookies file. These figures should
- be useful for editing the file. If cookie #12, say, is offensive, get out
- ResEdit and delete it. Then be sure to change cookie #M to #12 so that
- the numbers remain successive.
-
- The saying will stay on the window until you click the mouse, where upon
- a new saying is displayed. If insteaded of clicking, you hit a key or
- allow a certain amount of time to pass (determined by the length of the
- cookie but usually about 5-6 seconds) the Mac returns to the Finder.
-
- To keep the program simple there is no error checking other than verifying
- that the Cookies file actually exists. If it can't be found you'll be
- informed, but if you mess up the numbering order of the 'STR#' resources
- there is no guarantee that you'll still see a message. NOTE TO HFS USERS:
- The Fortune application can be anywhere on your volume, but place the
- Cookies file in your System Folder.
-
- I hope you get a chuckle out of this program. I think it's especially
- fun for hard disk users. If you find any good Cookies I'd appreciate
- it if you'd send them my way.
-
- David Fry
- Department of Mathematics
- Harvard University
- 1 Oxford Street
- Cambridge, MA 02138
-
- GEnie: D.FRY
- CompuServe: 73317,1265
- UUCP: ...!harvard!huma1!fry
- BITNET: fry@harvma1.BITNET or fry%huma1@harvsc4.BITNET
- ARPA: fry@huma1.harvard.EDU
-
-